﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="userList.ascx.cs" Inherits="uswinweb.datacontrol.userList" %>

	<p class="adnrt">
		<input name="keyword" id="keyword" class="soon" type="text" style="width:200px;" value="<%= action=="search"?parpms:"" %>" />
		<input name="" class="soso" type="button" value="搜索" onclick="search()" />
	</p>
	<ul class="adnr2 mar_top">
        <li><input type="checkbox" name="chkall" value="checkbox" id ="chkall"  onclick="CheckAll(this.form,'ids');"/></li>
        <li><a href="#"  class="l_blue" onclick="del('all')">批量删除</a></li>
	</ul>
		<table border="0" cellpadding="0" cellspacing="0" class="edtb">
			<thead>
				<tr>
					<td colspan="3">已有用户</td>
				</tr>
			</thead>
			<tbody>
        <% foreach (System.Data.DataRow dr in userTab.Rows)
           { %>
				<tr>
                <td width="6%"><input type="checkbox" name="ids" value="<%=dr["id"].ToString()%>"  id="ids"/></td>
					<td><%=dr["lname"] %></td>
					<td>
						<a title="" class="l_blue" href="#" onclick="del('<%=dr["id"] %>')" >删除</a>
					</td>
				</tr>
                <%} %>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="15">
						<%=pageList %>
					</td>
				</tr>
			</tfoot>
		</table>
		<%=_str %>
            <script>
                function del(val) {
                    if (confirm("该操作不可恢复,您确定要删除吗?")) {
                        loading();
                        if (val == 'all') {
                            val = checkedlist('ids');
                        }
                        var gid = '<%=groupID %>';
                        if (val != "") {
                            AjaxHelper.Updater('userList.ascx', 'showdata', 'action=del&gid=' + gid + '&parms=' + val + '');
                        }
                    } else {
                    }
                }
                function search() {
                    var gid = '<%=groupID %>';
                    var keyword = document.getElementById('keyword').value;
                    AjaxHelper.Updater('userlist.ascx', 'showdata', 'action=search&gid=' + gid + '&parms=' + keyword + '');
                }
            </script>